home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
C-Communications
/
(c)c12a.d64
/
nova.Data convrt
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
3KB
|
84 lines
10 POKE45,PEEK(174):POKE46,PEEK(175):CLR
20 DATA300,1200,2400,4800,9600,19200,38400
30 DATA3408,851,425,4915,1090,459,3410,845,421
40 DATA3283,820,409,4735,1050,442,3285,814,406
50 DV=PEEK(186):Q$=CHR$(34):IFDV<8ORDV>16THENDV=8
60 DIMP$(38),PH$(38),PW$(38),BD$(38),BD%(38),CG%(38),L8%(38),SC$(38),B%(17)
70 DIMFC$(16),P(12),BD(6):OPEN9,0:VN$="9.3":FORI=0TO6:READBD(I):NEXT
80 FORJ=0TOPEEK(678)
90 FORI=0TO8:READQ:R2=INT(Q/256):R1=Q-R2*256:B%(I*2)=R1:B%(I*2+1)=R2:NEXT:NEXT
100 D1=DV:D2=DV:D3=DV:D1$="0:":D2$="0:":D3$="0:":PN=4:PS=7:SW=0:C8=191:C9=15
110 XO=17:XF=19:XP=0:PA=0:FT=15:FC=32:SR=1
120 PRINT"[147][206]OVATERM CONFIG FILE CONVERTER"
130 PRINT"([195]ONVERTS OLDER CONFIG FILES TO V"VN$")":OPEN15,DV,15
140 PRINT"[197]NTER OLD VERSION NUMBER: [160][157]";:INPUT#9,V$:PRINT""
150 V=VAL(V$):IFV=0THEN440
160 VV$=MID$(STR$(V),2):IFV=INT(V)THENVV$=VV$+".0"
170 GOSUB610:IFV=0THEN140
180 IFV>9THEN260
190 PH=38:FORI=1TO38:IFBD$(I)=""THEN220
200 J=0:FORK=0TO6:IFVAL(BD$(I))=BD(K)THENJ=K:K=6
210 NEXT:BD%(I)=J
220 IFP$(I)=""THENPH=I-1:I=38
230 NEXT:IFBD<7THEN260
240 J=0:FORI=0TO6:IFBD=BD(I)THENJ=I:I=6
250 NEXT:BD=J
260 PRINT"[211]AVING...":IFPF$=""THENPF$="NOVA PHONE"
270 OPEN2,DV,2,"NOVA DATA "+VN$+",S,W":PRINT#2,VN$
280 FORI=2TO16:PRINT#2,Q$FC$(I):NEXT:PRINT#2,BD:PRINT#2,DI:PRINT#2,D1
290 PRINT#2,D2:PRINT#2,Q$D1$:PRINT#2,Q$D2$:PRINT#2,D3:PRINT#2,Q$D3$
300 PRINT#2,PN:PRINT#2,PS:PRINT#2,C1:PRINT#2,C2:PRINT#2,C3
310 PRINT#2,BE:PRINT#2,RE:PRINT#2,C8:PRINT#2,C9:PRINT#2,XO:PRINT#2,XF
320 PRINT#2,XP:PRINT#2,SW:PRINT#2,PA:PRINT#2,FT:PRINT#2,FC:PRINT#2,SR
330 FORI=0TO17:PRINT#2,B%(I):NEXT
340 PRINT#2,Q$MI$:PRINT#2,Q$MO$:PRINT#2,Q$PT$
350 PRINT#2,Q$FO$:PRINT#2,Q$F8$:PRINT#2,Q$TE$:PRINT#2,Q$AS$:PRINT#2,Q$PF$:CLOSE2
360 IFPH=0ORV>=9THEN440
370 IFPH<20THEN410
380 PRINT#15,"S:"PF$"1":OPEN2,DV,2,PF$+"1,S,W":PRINT#2,PH-19
390 FORI=20TOPH:PRINT#2,Q$P$(I):PRINT#2,Q$PH$(I):PRINT#2,Q$PW$(I):PRINT#2,BD%(I)
400 PRINT#2,CG%(I)+2*L8%(I):PRINT#2,Q$SC$(I):NEXT:CLOSE2:PH=19
410 PRINT#15,"S:"PF$:OPEN2,DV,2,PF$+",S,W"
420 PRINT#2,PH:FORI=1TOPH:PRINT#2,Q$P$(I):PRINT#2,Q$PH$(I):PRINT#2,Q$PW$(I)
430 PRINT#2,BD%(I):PRINT#2,CG%(I)+2*L8%(I):PRINT#2,Q$SC$(I):NEXT:CLOSE2:GOTO560
440 IFV>=9.2THEN560
450 PRINT"[197]NTER PHONE BOOK FILE: [160][157]";:INPUT#9,PF$:PRINT
460 IFPF$="[160]"THEN560
470 OPEN2,DV,2,PF$:INPUT#15,E:IFE>19THEN550
480 INPUT#2,PH:FORI=1TOPH:INPUT#2,P$(I),PH$(I),PW$(I),BD$(I)
490 INPUT#2,CG%(I),L8%(I),SC$(I):IFVAL(BD$(I))<7THENBD%(I)=VAL(BD$(I)):GOTO520
500 FORK=6TO0STEP-1:IFVAL(BD$(I))>=BD(K)THENBD%(I)=K:K=0
510 NEXT
520 NEXT:CLOSE2:PRINT#15,"S:"PF$:OPEN2,DV,2,PF$+",S,W":PRINT#2,PH
530 FORI=1TOPH:PRINT#2,Q$P$(I):PRINT#2,Q$PH$(I):PRINT#2,Q$PW$(I):PRINT#2,BD%(I)
540 PRINT#2,CG%(I)+2*L8%(I):PRINT#2,Q$SC$(I):NEXT
550 CLOSE2:GOTO440
560 PRINT"[147]":IFPEEK(6)<255THENEND
570 OPEN2,DV,0,"PROG MENU":INPUT#15,E:CLOSE2:IFE>19THEN590
580 LOAD"PROG MENU",DV
590 OPEN2,DV,0,"NOVATERM ?.?*":INPUT#15,E:CLOSE2:IFE>19THENEND
600 LOAD"NOVATERM ?.?*",DV,1
610 OPEN2,DV,2,"NOVA DATA "+VV$:INPUT#2,V$:IFV$<>VV$THENCLOSE2:GOTO830
620 IFV>8.1THEN660
630 FORI=1TO20:INPUT#2,P$(I),PH$(I),PW$(I),BD$(I),CG%(I):NEXT
640 FORI=2TO16:INPUT#2,FC$(I):NEXT
650 INPUT#2,BD,PR,S,W,H,C1,C2,C3,BE,RE,MI$,MO$,PT$,FO$,TE$:CLOSE2:RETURN
660 IFV>8.2THEN700
670 INPUT#2,PH:FORI=1TOPH:INPUT#2,P$(I),PH$(I),PW$(I),BD$(I),CG%(I):NEXT
680 FORI=2TO16:INPUT#2,FC$(I):NEXT
690 INPUT#2,BD,PR,S,W,H,C1,C2,C3,BE,RE,MI$,MO$,PT$,FO$,TE$:CLOSE2:RETURN
700 IFV>9THEN740
710 FORI=2TO16:INPUT#2,FC$(I):NEXT
720 INPUT#2,BD,PR,S,W,H,DI,C1,C2,C3,BE,RE,RM,L8,MI$,MO$,PT$,FO$,F8$,TE$,AS$,PF$
730 CLOSE2:RETURN
740 IFV>9.1THEN780
750 FORI=2TO16:INPUT#2,FC$(I):NEXT
760 INPUT#2,BD,DI,D1,D2,D1$,D2$,C1,C2,C3,BE,RE,RM,C8,C9,XO,XF,SW
770 INPUT#2,MI$,MO$,PT$,FO$,F8$,TE$,AS$,PF$:CLOSE2:RETURN
780 IFV>9.2THEN830
790 FORI=2TO16:INPUT#2,FC$(I):NEXT
800 INPUT#2,BD,DI,D1,D2,D1$,D2$,D3,D3$,PN,PS,C1,C2,C3,BE,RE,C8,C9,XO,XF,SW,PA
810 INPUT#2,FT,FC,SR:FORI=0TO17:INPUT#2,B%(I):NEXT
820 INPUT#2,MI$,MO$,PT$,FO$,F8$,TE$,AS$,PF$:CLOSE2:RETURN
830 PRINT"[214]ERSION NUMBER DOES NOT MATCH":V=0:RETURN